<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>后台管理系统</title>
<meta name="keywords" content="">
<meta name="description" content="">
<meta name="renderer" content="webkit">
<meta name="robots" content="noindex,nofollow">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-status-bar-style" content="black"> 
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="format-detection" content="telephone=no">
<link href="/favicon.ico" rel="shortcut icon">
<link rel="stylesheet" href="__ADMIN__/layui/css/layui.css">
<script type="text/javascript" src="__ADMIN__/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="__ADMIN__/layui/layui.js"></script>
<style type="text/css">
body{background: url(__ADMIN__/img/login-bj.jpg) no-repeat center center;background-size: cover;}
.login{width:260px;margin-top:200px!important;margin:0 auto;background:#fff;padding:60px 80px}
.login h2{font-size:28px;font-weight:100;color:#333;text-align:center;margin-bottom:50px}
</style>
</head>
<body>
<div class="login">
<h2>后台管理系统</h2>
<form class="layui-form">
  <div class="layui-form-item">
    <input type="text" name="username" placeholder="请输入账号" required lay-verify="required" autocomplete="off" class="layui-input">
  </div>
  <div class="layui-form-item">
    <input type="password" name="password" placeholder="请输入密码" required lay-verify="required" autocomplete="off" class="layui-input">
  </div>
  <div class="layui-form-item">
    <input type="text" name="kouling" placeholder="请输入口令" required lay-verify="required" autocomplete="off" class="layui-input">
  </div>
  <div class="layui-form-item">
    <input style="width:100px;float:left;margin-right: 10px;" type="text" name="code" placeholder="验证码" required lay-verify="required" autocomplete="off" class="layui-input">
    <img src="{:captcha_src()}" onclick="this.src='{:captcha_src()}?'+Math.random();" width="150" style="float:left; cursor:pointer;" alt="captcha" />
  </div>
  <div class="layui-form-item">
    <button style="padding: 0 102px;" class="layui-btn" lay-submit="" lay-filter="login_index">立即登录</button>
  </div>
</form>
</div>
<script type="text/javascript">
layui.use('form',function(){
  var form = layui.form()
  ,jq = layui.jquery;

  form.on('submit(login_index)', function(data){
    loading = layer.load(2, {
      shade: [0.2,'#000']
    });
    var param = data.field;
    jq.post('{:url("login/index")}',param,function(data){
      if(data.code == 200){
        layer.close(loading);
        layer.msg(data.msg, {icon: 1, time: 1000}, function(){
          location.href = '{:url("index/index")}';
        });
      }else{
        layer.close(loading);
        layer.msg(data.msg, {icon: 2, anim: 6, time: 1000});
      }
    });
    return false;
  });
})
</script>
{include file="index_footer"}
</body>
</html>